<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>

<head>
<title>稿件查询</title>
<script type="text/javascript">
$(document).ready(function(){
	if('<s:property value="searchManuscriptModel.ubeginDate"/>'==null || '<s:property value="searchManuscriptModel.ubeginDate"/>'=="") {
		$("input[name='searchManuscriptModel.ubeginDate']").val("");
	}
	if('<s:property value="searchManuscriptModel.uendDate"/>'==null || '<s:property value="searchManuscriptModel.uendDate"/>'=="") {
		$("input[name='searchManuscriptModel.uendDate']").val("");
	}
});
</script>
</head>
<body>
<s:form id="serchForm" action="manuscript/ListManuscript!searchManus" onsubmit="return true">
	<h3>请输入查询条件</h3>
	<table id="sTable" class="form">
		<tbody>
			<tr>
				<th width="10%">记者</th>
				<td width="15%"><m:dropUser name="searchManuscriptModel.userId" headValue="0" headKey="--请选择--" /></td>
				<th width="10%">报播栏目</th>
				<td width="15%"><m:select enumType="program.type" name="searchManuscriptModel.column" headKey="--请选择--"
					headValue="0" /></td>
				<th width="10%">撰稿日期</th>
				<td width="40%"><m:date name="searchManuscriptModel.beginDate" maxDate="0" />-<m:date name="searchManuscriptModel.endDate"
					maxDate="0" /></td>
			</tr>
			<tr>
				<th>关键字</th>
				<td colspan="3"><s:textfield maxlength="50" name="searchManuscriptModel.title" /></td>
				<th>使用日期</th>
				<td><m:date name="searchManuscriptModel.ubeginDate" maxDate="0" />-<m:date name="searchManuscriptModel.uendDate"
					maxDate="0" /></td>
			</tr>
		</tbody>
	</table>
	<div class="btnGroup"><s:submit id="search" value="查询" /></div>
</s:form>

<h2 class="title">查询稿件列表</h2>
<table class="list">
	<thead>
		<tr>
			<th width="6%">序号</th>
			<th width="30%">标题</th>
			<th width="15%">撰稿记者</th>
			<th width="10%">稿件状态</th>
			<th width="10%">上级审核人员</th>
			<th width="10%">撰稿栏目</th>
			<th width="10%">撰稿日期</th>
			<!-- <th width="9%">使用日期</th> -->
			<th width="10%">操作</th>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="manuscriptsList" status="aa">
			<tr id="pt${id }">
				<td><s:property value="#aa.index+1" /></td>
				<td><s:property value="title" /></td>
				<td><s:property value="user.name" /></td>
				<td><s:if test="auditZt==0">草稿</s:if> <s:elseif test="auditZt==1">一审中</s:elseif> <s:elseif test="auditZt==2">二审中</s:elseif>
				<s:elseif test="auditZt==3">三审中</s:elseif> <s:elseif test="auditZt==4">审核完毕</s:elseif> <s:elseif
					test="auditZt==-100">毙稿</s:elseif> <s:else>错误</s:else></td>
				<td><s:property value="auditUser.name" /></td>
				<td><m:property value="column" /></td>
				<td><s:date name="createDate" format="yyyy-MM-dd HH:mm" /></td>
				<!-- <td><s:date name="usedDate" format="yyyy-MM-dd" /></td> -->
				<td><m:imgA img="find" msg="查看信息" action="manuscript/EditManuscript!toEdit?manuscript.id=${id}&readOnly=true" />
				<m:imgA img="save" msg="打印" action="manuscript/EditManuscript!printManus?manuscript.id=${id}" /></td>
			</tr>
		</s:iterator>
	</tbody>
</table>
</body>